home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 128 27
/
q27.d81
/
t.factsheet 128
< prev
next >
Wrap
Text File
|
2022-08-28
|
5KB
|
119 lines
F A C T S H E E T 1 2 8
by Fender Tucker
I get around fifty newsletters from users' groups every month and quite
often they'll have PEEKs, POKEs and SYSes for the 128 mode listed in them.
In fact, they usually have the same old tips that have been around for
years, like the ESC codes which are listed on page 370 of your System Guide
or page 669 of the Programmer's Reference Guide (Bantam edition). For this
factsheet I'm going to thumb through the excellent (and unfortunately out
of print) MAPPING THE COMMODORE 128 by Ottis Cowper, Compute! Books, 1986,
and list some of the more interesting things I find.
NOTE: When two bytes are listed, they're in lo byte/hi byte format.
(1) Bit 6 of location 1 is connected to the CAPS LOCK key. Some C-64
software will only work if the CAPS LOCK is up (or down). Try it both
ways.
(2) 45/46 - Start of BASIC. To move BASIC up POKE these with lo and hi
byte of new start. You must also POKE a 0 into the location (in Bank 0) one
less than the new start and do a NEW to reset other variables. The same as
43/44 on the C-64.
(3) 47/48 - SOV pointer in Bank 1. To move variable space in Bank 1 up
(freeing up space for data, for instance) POKE these, then do a CLR.
(4) 57/58 - Top of memory in Bank 1 pointer. To store stuff above
variables, POKE these and do a CLR.
(5) 65/66 - Current DATA line number. If you get an ILLEGAL QNTY or TYPE
MISMATCH when reading DATA, the line shown won't be where the real error
is. PRINTPEEK(65)+26*PEEK(66) to get the real DATA line number.
(6) 186 - Current device number. This is essential for modern programming
to make your program work on any drives between 8 and 29. Every LOADSTAR
program has this line DV=PEEK(186):IFDV<8THENDV=8 at the beginning and
uses DV instead of 8 in BLOAD, BSAVE, and other disk commands.
(7) 208 - Number of characters in keyboard buffer. Analagous to 198 in the
C-64. POKE this to 0 to keep erroneous keypresses from "carrying over".
(8) 211 - Check for SHIFT/CMDR/CONTROL/ALT/CAPS LOCK pressed.
SHIFT -- 1
CMDR -- 2 To check for two or more
CTRL -- 4 keys pressed simultaneously
ALT -- 8 add these numbers.
CAPS -- 16
(9) 241 - Cursor color (0 to 15). Use this when the COLOR command is not
wanted.
(10) 243 - Reverse mode flag. 0 = not on.
(11) 244 - Quote mode flag. 0 = not in quote mode. A quick way to get out
of the quote mode.
(12) 808 - Disable STOP key. 808 is a dangerous thing to POKE on the C-64
and is banned on LOADSTAR. It disables the STOP key but causes all sorts of
unpredictable things (especially faulty saves) later on in the program.
Maybe 808 is okay on the C-128 but I'm too chicken to trust it. Using TRAP
wisely can make the STOP key less troublesome.
(13) 828 - Disable function keys.
POKE828,183 = disable
POKE828,173 = enable
(14) 842-851 - Keyboard buffer. Same as 631-640 on the C-64. For dynamic
keyboard effects, POKE these values and the computer will act as if the
user has pressed the keys whose values you POKE here. You must also set
location 208 to reflect how many keypresses you want processed.
(15) 862-865 - Line link bitmap. If you find that printing in the
rightmost column has caused subsequent PRINTs to be on the wrong row, do
this FORI=862TO865,POKEI,0:NEXT and things will be cleared up. I haven't
found this to be as much a problem on the C-128 as I have on the C-64.
(16) 2594 - Key repeat flag.
128 = all keys repeat
64 = no keys repeat
Otherwise only CRSR, SPACE, INST and DELETE repeat
Default = all keys repeat
(17) SYS52591 - Turn cursor on. Needed if you turn cursor off (below).
(18) SYS52639 - There are times when the damn cursor simply won't go away.
Use this.
(19) 52684 - The path to the VDC chip from BASIC. I've never used it
because CONTROL80 allows me to use PEER and POST (analogous to PEEK and
POKE). Do yourself a favor and use CONTROL80 (from LS 128 #10, #22, #24 or
#25).
(20) 53248-53296 - VIC registers. Same as the C-64! This is handy,
however, BASIC 7.0's sprite commands make things even easier for 40-column
sprite work.
(21) 54272-54300 - SID registers. Same as the C-64. Again, BASIC 7.0's
SOUND and PLAY commands make it unnecessary to deal with the SID chip at
the same low level that the C-64 requires.
(22) 54784-54785 - VDC registers. The docs for CONTROL 80 has a chart of
all 36 registers and some tips for tweaking them.
I'm sure that machine language programmers and BASIC programmers who
are more sophisticated than I would find many more interesting things in
this book, but these are about the only PEEKs, POKEs and SYSes I've ever
used. Maybe they may help you when you run into a diabolical bug -- and
you will, you will.
\\\\\ RETURN - Menu \\\\\